package com.proba.annotations.hibernate;

import java.sql.Timestamp;
import java.util.List;

import org.hibernate.criterion.Restrictions;

import com.proba.annotations.SostojbaNaMaterijaliDAO;
import com.proba.annotations.pojo.SostojbaNaMaterijali;

/**
 * <p>Hibernate DAO layer for SostojbaNaMaterijalis</p>
 * <p>Generated at Mon May 10 22:57:47 CEST 2010</p>
 *
 * @author Salto-db Generator v1.0.16 / EJB3 + Hibernate DAO
 * @see http://www.hibernate.org/328.html
 */
public class SostojbaNaMaterijaliHibernateDAO extends
		AbstractHibernateDAO<SostojbaNaMaterijali, Long> implements
		SostojbaNaMaterijaliDAO {

	/**
	 * Find SostojbaNaMaterijali by datum
	 */
	public List<SostojbaNaMaterijali> findByDatum(Timestamp datum) {
		return findByCriteria(Restrictions.eq("datum", datum));
	}
	
	/**
	 * Find SostojbaNaMaterijali by proizvodenPogon
	 */
	public List<SostojbaNaMaterijali> findByProizvodenPogon(Long proizvodenPogon) {
		return findByCriteria(Restrictions.eq("proizvodenPogon.proizvodenPogon", proizvodenPogon));
	}
	
	/**
	 * Find SostojbaNaMaterijali by potrosenMaterijal
	 */
	public List<SostojbaNaMaterijali> findByPotrosenMaterijal(Long potrosenMaterijal) {
		return findByCriteria(Restrictions.eq("potrosenMaterijal.potrosenMaterijal", potrosenMaterijal));
	}
	
	/**
	 * Find SostojbaNaMaterijali by primeno
	 */
	public List<SostojbaNaMaterijali> findByPrimeno(Long primeno) {
		return findByCriteria(Restrictions.eq("primeno", primeno));
	}
	
	/**
	 * Find SostojbaNaMaterijali by potroseno
	 */
	public List<SostojbaNaMaterijali> findByPotroseno(Long potroseno) {
		return findByCriteria(Restrictions.eq("potroseno", potroseno));
	}
	
	/**
	 * Find SostojbaNaMaterijali by komentar
	 */
	public List<SostojbaNaMaterijali> findByKomentar(String komentar) {
		return findByCriteria(Restrictions.eq("komentar", komentar));
	}
	

}
